import { request } from '@/utils/http'
// import qs from 'qs'

export function dictionaryListApi (params) {
  return request({
    url: '/api/dictionary/list',
    method: 'GET',
    params
  })
}
export function homePageApi (params) {
  return request({
    url: '/api/user/homePage',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}

export function loginApi (params) {
  return request({
    url: '/api/user/login',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}

export function addProblemApi (params) {
  return request({
    url: '/api/hiddenDanger/add',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function uploadApi (params) {
  return request({
    url: '/api/ftpUplload/upload',
    // url: '/api/common/upload',
    method: 'POST',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data: params
  })
}

export function listApi (params) {
  return request({
    url: '/api/user/userList',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}

export function toDoListApi (params) {
  return request({
    url: '/api/user/toDoList',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}

export function hiddenDangerApi (params) {
  return request({
    url: '/api/hiddenDanger/edit',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function getHiddenDangerApi (params) {
  return request({
    url: '/api/hiddenDanger/getOne',
    method: 'GET',
    params
  })
}

export function getToDoListApi (params) {
  return request({
    url: '/api/user/toDoOne',
    method: 'GET',
    params
  })
}

export function changeHiddenDangerApi (params) {
  return request({
    url: '/api/hiddenDanger/edit',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function userInfoApi (params) {
  return request({
    url: '/api/user/deTail',
    method: 'GET',
    params
  })
}
